package com.tchintech.pay.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * <p>
 * 数据持久化
 * </p>
 *
 * @author Roy
 * @version 1.0
 */
public class DataPersist {

    private SharedPreferences sharedPreferences;

    public DataPersist(Context mContext) {
        sharedPreferences = mContext.getSharedPreferences(
                DataPersist.PERSIST_FILE_NAME, Context.MODE_PRIVATE);
    }


    public void storeData(String key, String value) {
        sharedPreferences.edit().putString(key, value).commit();
    }

    public String getStringData(String key, String dafultValue) {
        return sharedPreferences.getString(key, dafultValue);
    }

//    //商洛
//    public static final String DEFAULT_SERVER_IP = "10.176.133.10";
//    public static final String DEFAULT_SERVER_PORT = "8883";
//    public static final String DEFAULT_SERVICE_NAME = "micp";
//    public static final String DEFAULT_PUSH_IP = "192.168.10.4";
//    public static final String DEFAULT_UDP_PORT = "9966";
//    public static final String DEFAULT_PUSH_PORT = "9967";
//    public static final String DEFAULT_SERVICE_STARTUPMODE = "0";// 服务启动连接模式（0：不连接安全客户端，1：连接信大安全客户端）

    //宝鸡
    public static final String DEFAULT_SERVER_IP = "127.0.0.1";
    public static final String DEFAULT_SERVER_PORT = "8882";
    public static final String DEFAULT_SERVICE_NAME = "micp";
    public static final String DEFAULT_PUSH_IP = "127.0.0.1";
    public static final String DEFAULT_UDP_PORT = "9966";
    public static final String DEFAULT_PUSH_PORT = "9967";
    public static final String DEFAULT_SERVICE_STARTUPMODE = "0";


//    //语音对讲ip
    public static final String DEFAULT_YUYIN_DUIJIANG_IP = "127.0.0.1";
    //语音对讲ip
//    public static final String DEFAULT_YUYIN_DUIJIANG_IP = "192.168.110.2";
    //语音对讲端口
    public static final String DEFAULT_YUYIN_DUIJIANG_PORT = "9900";
    //省份控制
    public static final String DEFAULT_PROVICE = "陕";
    //号牌前缀控制
    public static final String DEFAULT_HPHM = "C";
    //电子监控提交方式控制
    public static final int ELECTRONICTAGGING_UPLOAD = 2;//1:后台提交;2:直接提交
    //简易程序是否显示交款
    public static final int SAMPLEINPUT_PAY = 0;//0:不显示；1：显示
    //重新交款打印是否显示重新交款按钮
    public static final int PAYMENT_AGAIN_IS_VISIBLE = 0;//0:不显示；1：显示
    //推送的通知栏显示的地区控制
    public static final String DEFAULT_PUSH_CITY = "宝鸡";


    public static final String PERSIST_FILE_NAME = "SYS_CONFIG";
    public static final String KAKOU_DATA_NAME = "kakouDataName";
    public static final String USER_NAME = "username";
    public static final String PASSWORD = "password";
    public static final String SERVER_IP = "serverIp";
    public static final String SERVER_PORT = "serverport";
    public static final String SERVICE_NAME = "serviceName";
    public static final String PUSH_IP = "push_ip";
    public static final String UDP_PORT = "udp_port";
    public static final String PUSH_PORT = "push_port";
    public static final String SERVICE_STARTUPMODE = "serviceStartupmode";
    public static final String LOGIN_NAME = "userName";
    public static final String FORCE_PZTYPE = "forceType";
    public static final String FORCE_GDJK = "gdjl";
    public static final String HYBH = "jybh";
    public static final String LOGIN_PASS = "passWord";
    public static final String POLICE_STATION = "policeStation";
    public static final String SAMPLE_BLUETOOTH_NAME = "samplebluetoothname";
    public static final String SAMPLE_BLUETOOTH_ADDRESS = "samplebluetoothaddress";
    public static final String POS_BLUETOOTH_NAME = "posbluetoothname";
    public static final String POS_BLUETOOTH_ADDRESS = "posbluetoothaddress";
    public static final String BQ_BLUETOOTH_NAME = "a4bluetoothname";
    public static final String BQ_BLUETOOTH_ADDRESS = "a4bluetoothaddress";
    public static final String TAKE_BLUETOOTH_NAME = "takebluetoothname";
    public static final String TAKE_BLUETOOTH_ADDRESS = "takebluetoothaddress";
    public static final String TEAMNAME = "teamName";
    public static final String DIANHUA = "dianhua";
    public static final String BMJC = "bmjc";
    public static final String DWJGDM = "dwjgdm";//dwjgdm 单位机关代码
    public static final String MY_DEVICEID = "myDeviceId";//安卓设备唯一标示
    public static final String IS_PUSH_OPENED = "is_push_opened";//推送服务是否打开


    public static final String GONENAME = "goneUserName";
    public static final String GONEPWD = "gonePassWord";
    public static final String HAS_DOWN_LENGTH = "havedownlength";

    public static final String CURRENT_KAKOU = "current_kakou";
    public static final String CURRENT_TYPE = "current_type";
    public static final String MYSERVICEID = "my_serviceId";


    public static final String JIAOKUAN_DATE = "jiaokuan_date";
    public static final String JIAOYI_HUIZONG = "jiaoyi_huizong";


}
